function basic( context )
{
	this.init( context );
}

basic.prototype =
{
	name: "basic",
	
	context: null,

	prevMouseX: null, prevMouseY: null,

    prevArray: null,

	init: function( context )
	{
		this.context = context;
		this.context.globalCompositeOperation = 'source-over';
        this.prevArray = new Array();
	},

	destroy: function()
	{
	},

	strokeStart: function( mouseX, mouseY )
	{
		this.prevMouseX = mouseX;
		this.prevMouseY = mouseY
		this.context.fillStyle = "rgba(" + COLOR[0] + ", " + COLOR[1] + ", " + COLOR[2] + ")";
        this.context.beginPath();

	    this.context.arc(this.prevMouseX, this.prevMouseY, BRUSH_SIZE/2, 0, Math.PI * 2, true);

	    this.context.fill();
	},

	stroke: function( mouseX, mouseY )
	{
		this.context.lineWidth = BRUSH_SIZE;	
		this.context.strokeStyle = "rgba(" + COLOR[0] + ", " + COLOR[1] + ", " + COLOR[2] + ", " + 1 + ")";
		
		var len = this.prevArray.len;
		if (this.prevArray.len > 10) {
		    len = 10;

		}
		/*for (i = 0; i < len; i++)
		{

		    this.context.beginPath();
		    this.context.moveTo(this.prevArray.x, this.prevMouseY);
		    this.context.lineTo(mouseX, mouseY);
		    this.context.stroke();

		}*/

		this.context.beginPath();
		this.context.moveTo(this.prevMouseX, this.prevMouseY);
		this.context.lineTo(mouseX, mouseY);
		this.context.lineCap = 'round';
		this.context.stroke();

        this.prevArray.push({x: mouseX, y: mouseY})
		this.prevMouseX = mouseX;
		this.prevMouseY = mouseY;
	},

	strokeEnd: function()
	{

	}
}
